package com.android.nearshop.app.activity.forum;

import android.os.Bundle;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;

import com.android.nearshop.R;
import com.android.nearshop.app.activity.common.TemplateActivity;
import com.android.nearshop.app.activity.main.MainIndexActivity;
import com.android.nearshop.app.widget.TitleBar;
import com.android.nearshop.app.widget.TitleBar.OnTitleClickListener;

/**
 * 社区页面
 * 
 * @author huangyue
 * 
 */
public class ForumActivity extends TemplateActivity
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_forum);
    }

    protected void setupTitleBar(TitleBar titleBar)
    {
        titleBar.setLeftImage(R.drawable.icon_shake_small_w);
        titleBar.setLeftBg(R.drawable.red_button_bg);
        titleBar.setRightVisible(false);
        titleBar.setTitle(R.string.forum_title);

        titleBar.setOnTitleClickListener(new OnTitleClickListener()
        {
            // 到搜索页面
            public void onRightClick()
            {}

            // 返回摇一摇页面
            public void onLeftClick()
            {
                MainIndexActivity.gotoShake(ForumActivity.this,
                        mTitleBar.getLeftImgView());
            }
        }, true, false);
    }
}
